package com.itheima.service;


import com.itheima.service.impl.UserServiceImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppTest {
    public static void main(String[] args) {
        //读取配置文件获取对象
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        //获取容器中的对象
        UserServiceImpl userService = applicationContext.getBean("userService", UserServiceImpl.class);
        userService.save();
    }
}
